package com.isometricProjectionExmaple
{
	public class DrawnIsoTile extends IsoObject
	{
		protected var _height:Number;
		protected var _color:Number;
		public function DrawnIsoTile(size:Number,color:uint,h:Number = 0)
		{
			super(size);
			this._color = color;
			this._height = h;
			this.draw();
		}
		
		protected function draw():void
		{
			this.graphics.clear();
			this.graphics.beginFill(this._color);
			this.graphics.lineStyle(0,0xcccccc,0.5);
			this.graphics.moveTo(-size,0);
			this.graphics.lineTo(0,-size *0.5);
			this.graphics.lineTo(size,0);
			this.graphics.lineTo(0,size*0.5);
			this.graphics.lineTo(-size,0);
		}
		
		override public function set height(value:Number):void
		{
			this._height = value;
			this.draw();
		}
		
		override public function get height():Number
		{
			return this._height;
		}
		
		public function set color(value:uint):void
		{
			this._color = value;
			this.draw();
		}
		
		public function get color():uint
		{
			return this._color;
		}
	}
}